import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String s[]=scanner.nextLine().split(" ");
        int num[]=new int[10];
        for (int i=0;i<10;i++){
            num[i]=Integer.valueOf(s[i]);
        }
        int count=scanner.nextInt();
        for (int i=0;i<count;i++){
            int index= scanner.nextInt();
            num[index-1]+=10;
        }
        for (int i=0;i<9;i++){
            System.out.print(num[i]+" ");
        }
        System.out.print(num[9]);
    }
}
